package com.yabiao.idempotent.exception;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * <p>
 *
 * </p>
 *
 * @author: zhangyb
 * @create: 2020-09-13
 **/
@RestControllerAdvice
public class GlobalException {

    @ExceptionHandler(IdempotentException.class)
    public String idempotentExcetion(IdempotentException e){
        return e.getMessage();
    }
}
